<?php 
	//include("lib_db.php");
	//$q = isset($_REQUEST['q']) ? $_REQUEST['q'] : '';
	$sql = "select * from category_book ";
	$sql .= " where Menu = 'menu'";
	$menu = select_list($sql);
	
	

?>

				<div class= "header-logo">
				<img src = "img/logo.jpg"width = 1000, height = 150 >
				</div>
				<div class= "header-menu">					
					<div class="barMnu">
						<div class="barMnuLeft">
							<div class="barMnuRight">
								<ul class="dropdown">
								<li class=""><a href="index.php" class="actived"><span>Trang chủ</span></a></li>
								<?php if($menu) foreach ($menu as $data){?>	
									<li class="book"><a href="<?php echo $data['Link']?>?id=<?php echo $data['idCategory']?>"><span><?php echo $data['NameCategory']?></span></a>
									<ul class="mnuSub">
									<?php 
										$idCategory =  $data['idCategory'];
										
										$sql = "select * from category_book ";
										$sql .= " where menu_con = $idCategory";
										$menu_con1 = select_list($sql);
										if($menu_con1) foreach ($menu_con1 as $data1){
									?>	
										
											<li><a href="<?php echo $data1['Link']?>?id=<?php echo $data1['idCategory']?>"><?php echo $data1['NameCategory']?></a></li>											
										
									<?php } ?>	
									</ul>
									</li>
									
								<?php } ?>	
								</ul>
	
							<div class="clearfix"></div>
							</div>
						</div>
					</div>
				<div class="clear-both"></div>	
				</div><!--end header-menu-->
				